<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    /**
     * 定义一个对象  属性有姓名，重量，颜色
    */
    var dog = {
        dogName = "lily",
        weight:"20kg",
        color:"black",
        age:2,
        jump:function(){
            if(this.age >=2){
                console.log(this.dogName +"can jump");
            }
        }
    }
</script>
</html>